/**
 * Created by gl on 2017/4/14.
 */
public class DanJia {
    public static void main(String[] args){
        java.util.Scanner sv=new java.util.Scanner(System.in);
        String Str="y";


        int pice=0;
        while("y".equalsIgnoreCase(Str)){
            System.out.println("输入单价：");
          int num =sv.nextInt();
            System.out.println("是否继续：？(y/n)  ");
            Str=sv.next();
             pice +=num;

        }
        System.out.println("总额："+pice);
    }
}
